#pragma once

#include "pnt3f.h"

struct ray3f final
{
	static const size_t arity = 3;

	bool operator==(const ray3f rhs) = delete;

	pnt3f origin;
	vec3f dir;
};

inline ray3f ray3fc(const pnt3f origin, const vec3f dir)
{
	ray3f ray = { origin, dir };

	return ray;
}

ray3f create_ray_between_2_points(const pnt3f a, const pnt3f b, const float margin);
ray3f create_ray_from_pos_dir(const pnt3f pos, const vec3f dir, const float margin);
ray3f create_reflected_ray(const ray3f ray, const pnt3f p, const vec3f N, const float margin);
ray3f create_refraction_ray(const ray3f ray, const pnt3f p, const vec3f N,
	const float refraction_index, const float margin);
bool e_null_ray(const ray3f ray);